$OpenBSD: patch-net_udp_udp_socket_libevent_cc,v 1.7 2015/07/23 13:44:04 robert Exp $
--- net/udp/udp_socket_libevent.cc.orig.port	Wed Jul 15 22:30:05 2015
+++ net/udp/udp_socket_libevent.cc	Wed Jul 22 08:37:30 2015
@@ -37,7 +37,7 @@ const int kBindRetries = 10;
 const int kPortStart = 1024;
 const int kPortEnd = 65535;
 
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || defined(OS_BSD)
 
 // Returns IPv4 address in network order.
 int GetIPv4AddressFromIndex(int socket, uint32 index, uint32* address){
@@ -548,7 +548,7 @@ int UDPSocketLibevent::SetMulticastOptions() {
   if (multicast_interface_ != 0) {
     switch (addr_family_) {
       case AF_INET: {
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(OS_BSD)
         ip_mreqn mreq;
         mreq.imr_ifindex = multicast_interface_;
         mreq.imr_address.s_addr = htonl(INADDR_ANY);
@@ -623,7 +623,7 @@ int UDPSocketLibevent::JoinGroup(const IPAddressNumber
       if (addr_family_ != AF_INET)
         return ERR_ADDRESS_INVALID;
 
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(OS_BSD)
       ip_mreqn mreq;
       mreq.imr_ifindex = multicast_interface_;
       mreq.imr_address.s_addr = htonl(INADDR_ANY);
